    package com.ruoyi.pharmacy.service.impl;

    import java.util.Collections;
    import java.util.Date;
    import java.util.List;

    import com.ruoyi.pharmacy.domain.vo.PharmacyDrugStockVo;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Service;
    import com.ruoyi.pharmacy.mapper.PharmacyDrugStockMapper;
    import com.ruoyi.pharmacy.domain.PharmacyDrugStock;
    import com.ruoyi.pharmacy.service.IPharmacyDrugStockService;
    import org.springframework.transaction.annotation.Transactional;

    /**
     * 库存管理Service业务层处理
     *
     * @author ruoyi
     * @date 2025-08-22
     */
    @Service
    public class PharmacyDrugStockServiceImpl implements IPharmacyDrugStockService
    {
        @Autowired
        private PharmacyDrugStockMapper pharmacyDrugStockMapper;

        /**
         * 查询库存管理
         *
         * @param stockId 库存管理主键
         * @return 库存管理
         */
        @Override
        public PharmacyDrugStock selectPharmacyDrugStockByStockId(Integer stockId)
        {
            return pharmacyDrugStockMapper.selectPharmacyDrugStockByStockId(stockId);
        }

        /**
         * 查询库存管理列表
         *
         * @param pharmacyDrugStock 库存管理
         * @return 库存管理
         */
        @Override
        public List<PharmacyDrugStock> selectPharmacyDrugStockList(PharmacyDrugStock pharmacyDrugStock)
        {
            return pharmacyDrugStockMapper.selectPharmacyDrugStockList(pharmacyDrugStock);
        }

        /**
         * 查询库存管理列表
         *
         * @param pharmacyDrugStock 库存管理
         * @return 库存管理
         */
        @Override
        public List<PharmacyDrugStockVo> selectPharmacyDrugStockVoList(PharmacyDrugStock pharmacyDrugStock) {
            return pharmacyDrugStockMapper.selectPharmacyDrugStockVoList(pharmacyDrugStock);
        }

        /**
         * 新增库存管理
         *
         * @param pharmacyDrugStock 库存管理
         * @return 结果
         */
        @Override
        public int insertPharmacyDrugStock(PharmacyDrugStock pharmacyDrugStock)
        {
            return pharmacyDrugStockMapper.insertPharmacyDrugStock(pharmacyDrugStock);
        }

        /**
         * 修改库存管理
         *
         * @param pharmacyDrugStock 库存管理
         * @return 结果
         */
        @Override
        public int updatePharmacyDrugStock(PharmacyDrugStock pharmacyDrugStock)
        {
            return pharmacyDrugStockMapper.updatePharmacyDrugStock(pharmacyDrugStock);
        }

        /**
         * 批量删除库存管理
         *
         * @param stockIds 需要删除的库存管理主键
         * @return 结果
         */
        @Override
        public int deletePharmacyDrugStockByStockIds(Integer[] stockIds)
        {
            return pharmacyDrugStockMapper.deletePharmacyDrugStockByStockIds(stockIds);
        }

        /**
         * 删除库存管理信息
         *
         * @param stockId 库存管理主键
         * @return 结果
         */
        @Override
        public int deletePharmacyDrugStockByStockId(Integer stockId)
        {
            return pharmacyDrugStockMapper.deletePharmacyDrugStockByStockId(stockId);
        }

    }
